Get Companies with Pagination
The Get Companies with Pagination API enables to fetch and show the list of companies.
Method: POST
{{URL}}/jsonrpc
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
Parameter | Description |
---|---|
id Mandatory | String Unique ID of request Example – "1" |
method Mandatory | String Method Name Example – "VisaService.GetCompaniesWithPagination " |
params | Object |
api | Object |
credential Mandatory | String API credential provided by NetXD Example – "Basic cy5wYXJhbWVzd2FyYW4rMkBiYW5rY2J3Lm9yZzpUZXN0QDEyMzQ=" |
signature Mandatory | String Signature of the digitally signed payload Example – "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA==" |
payload | Object |
pageNo Optional | Number Current page number Example – 1 |
pageSize Optional | Number Number of records per page that can contain Example – 10 |
- cURL
- C#
- Go
- NodeJs
curl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data '{"id":"1","method":"VisaService.GetCompaniesWithPagination","params":{"api":{"credential":"Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5","signature":"MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="},"payload":{"pageNo":1,"pageSize":10}}}'
var options = new RestClientOptions("{{URL}}/jsonrpc")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""method"": ""VisaService.GetCompaniesWithPagination"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""credential"": ""Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5"",
" + "\n" +
@" ""signature"": ""MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA==""
" + "\n" +
@" },
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""pageNo"":1,
" + "\n" +
@" ""pageSize"":10
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{URL}}/jsonrpc"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"id": "1",`+"
"+`
"method": "VisaService.GetCompaniesWithPagination",`+"
"+`
"params": {`+"
"+`
"api": {`+"
"+`
"credential": "Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5",`+"
"+`
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="`+"
"+`
},`+"
"+`
"payload": {`+"
"+`
"pageNo":1,`+"
"+`
"pageSize":10`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{URL}}',
'path': '/jsonrpc',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"id": "1",
"method": "VisaService.GetCompaniesWithPagination",
"params": {
"api": {
"credential": "Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5",
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="
},
"payload": {
"pageNo": 1,
"pageSize": 10
}
}
});
req.write(postData);
req.end();
Body
{
"id": "1",
"method": "VisaService.GetCompaniesWithPagination",
"params": {
"api": {
"credential": "Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5",
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="
},
"payload": {
"pageNo":1,
"pageSize":10
}
}
}
Response: 201
Response Parameters
Parameter | Description |
---|---|
jsonrpc | String JSON RPC VERSION Example – "2.0" |
result | Object |
companies | Array |
id | String Unique ID of company Example – "65df5bd7bc2422fb17c975f6" |
createdDate | String Date and time of the company was created Example – "2024-02-28T16:14:15.457Z" |
active | Boolean Whether the company is active or not Example – false |
orgName | String Name of the company Example – "CCCC" |
approve | Boolean Whether the company is approved or not Example – false |
accountNumber | String Account number of company Example – "12313233 " |
companyResponse | Object |
statusText | String Current status of the company Example – "ACTIVE " |
ceProcessDate | String Date and time of the risk score was processed by context engine Example – "0001-01-01T00:00:00Z" |
riskScore | String Level of risk associated with the company Example – "Disabled" |
watchListCount | String Number of times the company appears on watchlist Example – "Disabled" |
nsProcessDate | String Date and time of the company was processed for name screening Example – "0001-01-01T00:00:00Z" |
status | String Current approval status of the company Example – "WAITING_FOR_APPROVAL" |
approvedDate | String Date and time of the company was approved Example – "0001-01-01T00:00:00Z" |
updatedDate | String Date and time of the company information was last updated Example – "0001-01-01T00:00:00Z" |
owner1WatchListCount | String Number of times the owner1 of the company appears on watchlist Example – "Disabled" |
owner2WatchListCount | String Number of times the owner2 of the company appears on watchlist Example – "Disabled" |
owner3WatchListCount | String Number of times the owner3 of the company appears on watchlist Example – "Disabled" |
isOnFlyCorporate | Boolean Determines adding new companies for payment If enabled (True) – allows for addition of new company during payment If disabled (False) – new company can be added only through ‘addCompany' API call |
id | String Unique ID of the request Example – "1" |
{
"jsonrpc": "2.0",
"result": {
"totalElements": 1,
"companies": [
{
"id": "65df5bd7bc2422fb17c975f6",
"createdDate": "2024-02-28T16:14:15.457Z",
"active": false,
"orgName": "CCCC",
"approve": false,
"accountNumber": "12313233",
"companyResponse": {
"statusText": "ACTIVE"
},
"ceProcessDate": "0001-01-01T00:00:00Z",
"riskScore": "Disabled",
"watchListCount": "Disabled",
"nsProcessDate": "0001-01-01T00:00:00Z",
"status": "WAITING_FOR_APPROVAL",
"approvedDate": "0001-01-01T00:00:00Z",
"updatedDate": "0001-01-01T00:00:00Z",
"owner1WatchListCount": "Disabled",
"owner2WatchListCount": "Disabled",
"owner3WatchListCount": "Disabled",
"isOnFlyCorporate": false
}
]
},
"id": "1"
}